function ngW8_top_app_bar($tmp) {
    window.top.ngW8.topAppBar = new WinJS.UI.AppBar($($tmp.$e[0])[0], { placement: 'top', layout: 'custom', sticky: true });
    window.top.ngW8.topAppBar.addEventListener("afterhide", function (info) {
        if (window.top.ngW8.$onTopBarHideCallback) {
            window.top.ngW8.$onTopBarHideCallback($(info.srcElement).find(".win-firstdiv"));
        }
    });
    window.top.ngW8.topAppBar.addEventListener("beforeshow", function (info) {
        if (window.top.ngW8.$onTopBarShowCallback) {
            window.top.ngW8.$onTopBarShowCallback($(info.srcElement).find(".win-firstdiv"));
        }
    });
};